<html>
<head>
    <style>
    	
        html, body, form, fieldset, h1, h2, h3, h4, h5, h6, p, pre, blockquote, ul, ol, dl, address {
            margin: 0;
            padding: 0;
        }
        
        body {
            font: 76% / 160% "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
        }
        
        table {
            width: 98%px;
            border: 2px solid #000000;
            margin: 1em auto;
            border-collapse: collapse;
        }
        
        /*
         * first row of table header
         */
        tr.table-header1 {
            padding: 0;
            margin: 0;
        }
        tr.table-header1 td {
        	font-size: 12px;
        }
        tr.table-header1 td.divider {
            border-right: 1px solid #000000;
            padding: 0 1 0 1;
        }
        
        tr.table-header1 td img {
            padding: 0;
            margin: 0;
        }
        
        /*
         * second row of the table headers
         */
        tr.table-header2 td {
            text-align: left;
        }
		tr.table-header2 td {
			font-size: 12px;
		}
        
        /*
         * do not show the dividing lines
         */
        tr.table-header2 td.divider {
            border-right: 1px solid #000000;
        }
        
        /*
         * third row of table headers
         */
        tr.subheader {
            border: 2px solid #000000;
        }
        
        tr.subheader td {
            vertical-align: top;
        }
        
        /*
         * show the dividing lines
         */
        td.divider {
            border-right: 2px solid #000000;
        }
        
        /*
         * table footer
         */
        tfoot {
            border-bottom: 2px solid #000000;
            border-top: 2px solid #000000;
        }
        
        tfoot td {
            border: none;
            text-align: left;
            padding: 0 1 0 1;
        }
        
        /*
         * odd rows
         */
        tr.odd td {
            background: #f7fbff
        }
        
        /*
         * table cells
         */
        td {
            color: #000000;
            font-size: 10px;
            border-bottom: 1px solid #000000;
            border-left: 1px solid #000000;
            padding: .1em 0.1em;
            text-align: center;
        }
		
		td.align-left {
			text-align: left;
		}
		
		tr.subheader td {
			text-align: center;
		}
		
		tr.table-header1 td {
			text-align: center
		}
		tr.table-header2 td {
			text-align: center;
		}
		
		#summary-table tr td {
			text-align: right;
		}
        #summary-table tr th {
			text-align: right;
			font-size: 10px;
			border: solid 0.1em;
			
		}
    </style>
</head>
	<body>
		<div id="report_summary">
			<h1>Report Summary</h1>
			
			<table id="summary-table">
				<tr><th>Time Created:</th><td>{{ query_time }}</td></tr>
				<tr><th>From :</th><td>{{ query_from_date}}</td></tr>
				<tr><th>To:</th><td>{{ query_to_date }}</td></tr>
				<tr><th>Client Name: </th><td>{{ client_name }}</td></tr>
				<tr><th>Project Name:</th><td>{{ project_name }}</td></tr>
				<tr><th>Testing Type:</th><td> {{ testing_type }}</td></tr>
				<tr><th>Compaction Form ID:</th><td> {{ PARENT_RECORD_ID }}</td></tr>
				<tr><th>No. of Testing</th><td> {{ count }}</td></tr>
			{% ifequal count 1000 %}
				<tr><td>*IMPORTANT:</td><td>Only the first 1000 testing records is reported. Please narrow the search</td></tr>
			{% endifequal %}
			</table>
			 
			 
			 
			
			 
			
		</div>
		{% for project in projects %}
		
		{% for table in project.tables %}
		<table style="page-break-before:always">
			<tr class="table-header1"><td class="client divider"  colspan="4"><strong>Client:</strong> {{project.client_name}}</td><td class="divider" colspan="6"><strong>Project:</strong> {{project.project_name}}</td><td colspan="3"><img alt="DLZ LOGO" src="/static/resources/dlz/resources/images/DLZLogo.jpg"></img></td></tr>
			<tr class="table-header2"><td class="divider" colspan="7"><strong>Summary of Compaction Test Data</strong></td><td class="divider" colspan="3"><strong>Date:</strong>{{project.date}}</td><td class="divider" colspan="3"><strong>DLZ Job No:</strong> {{project.project_number}}</td></tr>
			<tr class="subheader"><td rowspan="2">Test No.</td><td width="60px" rowspan="2">Date</td><td class="divider" rowspan="2">Location</td><td class="divider" rowspan="2">Test Interval</td><td class="divider" colspan="3"><strong>Field Test Data</strong></td><td class="divider" colspan="3"><strong>Control Data</strong></td><td class="divider" colspan="2"><strong>Compaction</strong></td><td rowspan="2"><strong>Remarks</strong></td></tr>
			<tr class="subheader"><td>Wet Unit Weight(pcf)</td><td>Moisture Content(%)</td><td class="divider" >Dry Unit Weight(pcf)</td><td>Curve No.</td><td>Maximum Dry Unit Weight (pcf)</td><td class="divider" >Optimum Moisture Content (%)</td><td>Specified(%)</td><td class="divider" >Obtained(%)</td></tr>
		{% for r in table %}
			<tr class="{{ r.class }}"><td class="align-left">{{ r.report_test_no }}</td><td class="align-left">{{ r.form_date }}</td><td class="divider align-left" width="200px">{{r.test_location}}</td><td class="divider align-left" width="100px">{{r.test_interval}}</td><td class="divider" >{{r.wet_unit_weight}}</td><td>{{r.moisture_content}}</td><td>{{r.dry_unit_weight}}</td><td class="divider" >{{r.curve_no}}</td><td>{{r.max_dry_unit_weight}}</td><td class="divider" >{{r.optimum_moisture_content}}</td><td>{{r.specified}}</td><td>{{r.obtained}}</td><td width="50px">{{r.remarks}}</td></tr>
		{% endfor %}
<!--		
			<tr ><td>1</td><td>1/1/2010</td><td class="divider" >Column Line D-3</td><td class="divider" >-1.5' grade</td><td>1</td><td>2</td><td class="divider" >3</td><td>4</td><td>5</td><td class="divider" >6</td><td>7</td><td class="divider" >8</td><td>9</td></tr>
			<tr class="odd"><td>1</td><td>1/1/2010</td><td class="divider" >Column Line D-3</td><td class="divider" >-1.5' grade</td><td>1</td><td>2</td><td class="divider" >3</td><td>4</td><td>5</td><td class="divider" >6</td><td>7</td><td class="divider" >8</td><td>9</td></tr>
			<tr ><td>1</td><td>1/1/2010</td><td class="divider" >Column Line D-3</td><td class="divider" >-1.5' grade</td><td>1</td><td>2</td><td class="divider" >3</td><td>4</td><td>5</td><td class="divider" >6</td><td>7</td><td class="divider" >8</td><td>9</td></tr>
			<tr class="odd"><td>1</td><td>1/1/2010</td><td class="divider" >Column Line D-3</td><td class="divider" >-1.5' grade</td><td>1</td><td>2</td><td class="divider" >3</td><td>4</td><td>5</td><td class="divider" >6</td><td>7</td><td class="divider" >8</td><td>9</td></tr>
			<tr ><td>1</td><td>1/1/2010</td><td class="divider" >Column Line D-3</td><td class="divider" >-1.5' grade</td><td>1</td><td>2</td><td class="divider" >3</td><td>4</td><td>5</td><td class="divider" >6</td><td>7</td><td class="divider" >8</td><td>9</td></tr>
-->
			<tfoot>
				<tr><td colspan="13">Notes: E.M. = Excessive Moisture, I.M. = Insufficient Moisture, I.C. = Insufficient Compaction, DNC=Does Not Comply</td></tr>
				<tr><td colspan="13">Remarks: **DLZ Ohio, Inc. typical curve used. BEG-Depth below existing ground</td></tr>
			</tfoot>
		</table>
		{% endfor %}
		{% endfor %}
	</body>
</html>